<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>盒子塌陷问题解决方案1</title>
		<style>
			#main{
				border: 1px solid red; 
			}
			#main>div{
				height: 160px;
				width: 160px;
				background-color: black;
				color:white;
				float: left;
				margin: 4px;
			}
			.clear{
				height: 0;
				display: block;
				clear: both;
				content: '';
			}
		</style>
	</head>
	<body>
		<p>
			方法2，浮动元素外层盒子的后面，添加一个高度为0的空元素，设置他的清除浮动熟悉。
		</p>
		<div id="main">
			<div>1</div>
			<div>222</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
			<div>6</div>
			<div>7</div> 
			<div>8</div> 
			<div>9</div> 
			<div>10</div>
		</div>
		<div class="clear"></div>
		<p style="border: 5px groove goldenrod;">
			王帅是个好小伙
		</p>
	</body>
</html>